package com.mega.fe.mixins;

import com.mega.fe.registry.CommandInit;
import com.mega.fe.util.BaseInit;
import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.Commands;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(Commands.class)
public class CommandsCreateListener {
    @Inject(method = "<init>", at = @At("RETURN"))
    private void init(Commands.CommandSelection p_230943_, CommandBuildContext p_230944_, CallbackInfo ci) {
        BaseInit.commands_instances.add((Commands) (Object) this);
        CommandInit.register();
    }
}
